A representation type <A ID="3513"><tex2html_anchor_invisible_mark></A><A ID="3514"><tex2html_anchor_invisible_mark></A> allows an application to
request different representations of the same resource value. For example, a
color value might be represented either as a name string (``red''), a pixel
value, an RGB
triplet, an HSV triplet, etc. Only one representation for the resource value is
actually stored in a resource database. Conversion functions may be invoked
to return a representation type different from the one stored.
<P>
The representation type used for a contact resource is defined by the <#3515#><TT>:type</TT><#3515#> option of its resource specification in the <#3516#><TT>defcontact</TT><#3516#>. During
contact initialization, a contact resource value read from a resource
database by <#3517#><TT>make-contact</TT><#3517#>
<A ID="3518"><tex2html_anchor_invisible_mark></A>
is automatically converted
to its specified representation type.
<P>
CLUE performs resource representation type conversion by calling the
<#3519#><TT>convert</TT><#3519#> function.
<A ID="3520"><tex2html_anchor_invisible_mark></A>
CLUE defines methods for the <#3521#><TT>convert</TT><#3521#> function to handle all standard
conversions.
The standard representation type conversions provided by CLUE are shown
in Figure~<A HREF=<tex2html_cr_mark>#fig:conversions#3522><tex2html_cr_mark></A>.<A ID="3523"><tex2html_anchor_invisible_mark></A>
<P>
In order
to define a new representation type, the contact programmer must define
methods for <#3524#><TT>convert</TT><#3524#> that handle the new representation type appropriately. Typically,
<#3525#><TT>convert</TT><#3525#> methods will specify parameter specializers for <#3526#><TT>type</TT><#3526#>
(e.g. <#4541#><TT>(eql <#3527#><EM>data-type</EM><#3527#>)</TT><#4541#>) and for <#3528#><TT>value</TT><#3528#> and will be defined only